package com.merryituxz.o2o.service;

import com.merryituxz.o2o.dto.ImageHolder;
import com.merryituxz.o2o.dto.ShopExecution;
import com.merryituxz.o2o.entity.Shop;
import org.apache.ibatis.annotations.Param;

import java.io.File;
import java.io.InputStream;

public interface ShopService {
    /**
     * 注册店铺
     *
     * @param shop
     * @param thumbnail 图片(封装了图片流+图片名称)
     * @return
     */
    ShopExecution addShop(Shop shop, ImageHolder thumbnail);

    /**
     * 通过shopId获取店铺信息
     *
     * @param shopId
     * @return
     */
    Shop getByShopId(long shopId);

    /**
     * 更新店铺信息, 包括对图片的处理
     *
     * @param shop
     * @param thumbnail 图片(封装了图片流+图片名称)
     * @return
     */
    ShopExecution modifyShop(Shop shop, ImageHolder thumbnail);

    /**
     * 根据shopCondition分页返回相应列表数据
     *
     * @param shopCondition
     * @param pageIndex
     * @param pageSize
     * @return
     */
    ShopExecution getShopList(Shop shopCondition, int pageIndex, int pageSize);

}
